<template>
  <div class="bpl1-bg">
    <div class="co-title">
      <div class="co-title-name">
        <img src="@/assets/cockpit/subdivision/js-text-tdbhxf.png" alt="" />
      </div>
      <div class="co-title-right">
        <div class="co-title-breathe"><i></i><i></i><i></i><i></i><i></i><i></i></div>
      </div>
    </div>
    <div class="detail-content">
      <div class="left">
        <ul class="detail-num">
          <div class="com-title-style">
            <div class="title-line">
              <img src="@/assets/cockpit/subdivision//wq-icon-yq.png" alt="" />
            </div>
            <div class="text">土地全域综合整治项目</div>
          </div>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">项目面积</div>
            </div>
            <div class="number">601.23公顷</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">项目总数</div>
            </div>
            <div class="number">21个</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">实施中的项目数</div>
            </div>
            <div class="number">10个</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">已验收项目数</div>
            </div>
            <div class="number">8个</div>
          </li>
        </ul>
      </div>
      <div class="mid-line"></div>
      <!--  -->
      <div class="left">
        <ul class="detail-num">
          <div class="com-title-style">
            <div class="title-line">
              <img src="@/assets/cockpit/subdivision//wq-icon-yq.png" alt="" />
            </div>
            <div class="text">土地复垦项目</div>
          </div>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">项目面积</div>
            </div>
            <div class="number">601.23公顷</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">项目总数</div>
            </div>
            <div class="number">21个</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">实施中的项目数</div>
            </div>
            <div class="number">10个</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">已验收项目数</div>
            </div>
            <div class="number">8个</div>
          </li>
        </ul>
      </div>
      <div class="mid-line"></div>
      <!--  -->
      <div class="left">
        <ul class="detail-num">
          <div class="com-title-style">
            <div class="title-line">
              <img src="@/assets/cockpit/subdivision//wq-icon-yq.png" alt="" />
            </div>
            <div class="text">增减挂钩项目</div>
          </div>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">项目面积</div>
            </div>
            <div class="number">601.23公顷</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">项目总数</div>
            </div>
            <div class="number">21个</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">实施中的项目数</div>
            </div>
            <div class="number">10个</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">已验收项目数</div>
            </div>
            <div class="number">8个</div>
          </li>
        </ul>
      </div>
      <div class="mid-line"></div>
      <!--  -->
      <div class="left">
        <ul class="detail-num">
          <div class="com-title-style">
            <div class="title-line">
              <img src="@/assets/cockpit/subdivision//wq-icon-yq.png" alt="" />
            </div>
            <div class="text">生态修复项目</div>
          </div>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">项目面积</div>
            </div>
            <div class="number">601.23公顷</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">项目总数</div>
            </div>
            <div class="number">21个</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">实施中的项目数</div>
            </div>
            <div class="number">10个</div>
          </li>
          <li>
            <div class="title">
              <div class="icon"></div>
              <div class="name">已验收项目数</div>
            </div>
            <div class="number">8个</div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator'
import echarts from 'echarts'

@Component({
  name: 'BuildLandItem5',
  components: {}
})
export default class BuildLandItem5 extends Vue {
  mounted() {
    this.initVillage()
  }
  initVillage() {
    const myChart = echarts.init(document.getElementById('village') as HTMLElement)
    myChart.setOption({
      label: {
        color: '#ffffff'
      },
      grid: {
        top: '14%',
        left: '4%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      xAxis: {
        type: 'category',
        data: ['芙蓉区', '开福区', '天心区', '雨花区', '望城区', '长沙县', '浏阳市', '宁乡市'],
        //设置网格线颜色
        splitLine: {
          show: false
        },
        axisLine: {
          lineStyle: {
            color: '#254177'
          }
        },

        axisLabel: {
          show: true,
          textStyle: {
            color: '#ffffff', //更改坐标轴文字颜色
            fontSize: 12 //更改坐标轴文字大小
          }
        }
      },
      yAxis: {
        type: 'value',
        axisLabel: {
          show: true,
          textStyle: {
            color: '#ffffff', //更改坐标轴文字颜色
            fontSize: 12 //更改坐标轴文字大小
          }
        },
        splitLine: {
          show: false,
          lineStyle: {
            color: ['#000000'],
            width: 0,
            type: 'solid'
          }
        },
        // y轴轴线颜色
        axisLine: {
          lineStyle: {
            color: '#254177'
            // width: 1 //这里是坐标轴的宽度
          }
        }
      },
      series: [
        {
          data: [8, 7, 3, 14, 16, 19, 10, 8],
          type: 'bar',
          barWidth: '18%',
          itemStyle: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
              {
                offset: 0,
                color: '#6dffd6'
              },
              {
                offset: 1,
                color: '#00FFAA'
              }
            ])
          },
          showBackground: true,
          backgroundStyle: {
            color: 'rgba(180, 180, 180, 0.2)'
          }
        }
      ]
    })
  }
}
</script>
<style lang="scss" scoped>
@import '~@/styles/cockpit.scss';
.bpl1-bg {
  width: 100%;
  height: 100%;
  padding: 22px 12px 12px 16px;
  // background: url('~@/assets/cockpit/bpl1-bg.png') no-repeat right center/ 100% 100%;
  background: url('~@/assets/cockpit/bb-bg.png') no-repeat 0/ 100% 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  // &::before {
  //   content: '';
  //   display: block;
  //   width: 20px;
  //   height: 103%;
  //   background: url('~@/assets/cockpit/bpl-bg-line.png') no-repeat 0/ 100% 100%;
  //   position: absolute;
  //   left: -10px;
  //   top: 50%;
  //   transform: translate(0, -50%);
  // }
  .co-title {
    flex-shrink: 0;
  }
}

.bpl1-table {
  width: 100%;
  .bpl1-tbe {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0px 2px;
    text-align: center;
    .bpl1-tbeh {
      height: 20px;
      background: rgba(#fff, 0.1);
      th {
        font-size: 12px !important;
        line-height: 18px;
        color: #bffeff;
        font-weight: 400;
      }
    }
    .bpl1-tbeb {
      td {
        padding: 4px 4px;
        background: rgba(#fff, 0.05);
        font-size: 16px !important;
        line-height: 20px;
        color: #fff;
        font-weight: 500;
        > span {
          font-size: 12px !important;
          color: #fff;
          font-weight: 400;
        }
      }
      .bpl1-tbeb-title {
        padding: 0 0 0 2px !important;
        background: none;
        border-left: 2px solid #006aff;
        position: relative;
        > p {
          width: 100%;
          height: 100%;
          padding: 4px;
          background: rgba(#fff, 0.05);
          line-height: 20px;
          text-align: center;
          font-size: 12px !important;
          color: #fff;
          font-weight: 400;
        }
      }
    }
  }
}
.bpl1-stac {
  width: 100%;
  display: flex;
  padding: 32px 0 0 22px;
  flex-wrap: wrap;
  .bpl1-st-each {
    flex: none;
    display: flex;
    width: 50%;
    .bpl1-ste-icon {
      flex: none;
      width: 64px;
      height: 64px;
      > img {
        display: block;
        width: 100%;
        height: 100%;
      }
    }
    .bpl1-ste-word {
      flex: none;
      > h6 {
        font-size: 12px !important;
        line-height: 18px;
        color: #bffeff;
        text-align: left;
        font-weight: 400;
        margin: 6px 0 0 0;
      }
      > p {
        font-size: 24px !important;
        line-height: 30px;
        color: #fff;
        text-align: left;
        font-weight: 500;
        margin: 4px 0 0 0;
      }
    }
    .bpl1-ste-chart {
      flex: none;
      width: 64px;
      height: 64px;
      padding: 2px;
      position: relative;
      margin: 0 0 0 12px;
      .bpl1-ste-chart-base {
        width: 100%;
        height: 100%;
      }
      .bpl1-ste-chart-word {
        width: 80%;
        position: absolute;
        left: 10%;
        top: 50%;
        transform: translate(0, -50%);
        > h6 {
          font-size: 16px !important;
          text-shadow: 0 0 4px #00ffaa;
          color: #fff;
          line-height: 20px;
          text-align: center;
        }
        > p {
          font-size: 12px !important;
          line-height: 14px;
          color: #bffeff;
          text-align: center;
        }
      }
    }
  }
  .bpl1-st-line {
    flex: none;
    width: 1px;
    height: 64px;
    background: rgba(#fff, 0.1);
    margin: 0 4px;
  }
}

.com-title-style {
  margin-bottom: 4px;
  margin-top: 16px;
  color: #bffeff;
  display: flex;
  .text {
    margin-top: 6px;
  }
  .title-line {
    width: 40px;
    margin-top: -7px;
    img {
      display: block;
      width: 100%;
    }
  }
}

.detail-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex: 1;
  .left {
    flex: 1;
    .detail-num {
      margin-top: 10px;
      li {
        display: flex;
        justify-content: space-between;
        width: 210px;
        height: 24px;
        line-height: 24px;
        background: rgba(255, 255, 255, 0.05);
        margin-bottom: 6px;

        .title {
          display: flex;
          margin-left: 6px;
          .icon {
            width: 4px;
            height: 4px;
            margin-top: 10px;
            margin-right: 6px;
            display: block;
            background: #f9f0d4;
            border-radius: 1px;
            box-shadow: 0 0 4px 1px #f0b04a;
            transform: rotate(45deg);
          }
          .name {
            font-size: 12px;
            color: #bffeff;
          }
        }

        .number {
          font-size: 14px !important;
          text-align: right;
          color: #fff;
          margin-right: 6px;
        }
      }
    }
  }
  .mid-line {
    width: 1px;
    height: 152px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 0;
    margin-top: 17px;
    margin-right: 10px;
    flex-shrink: 0;
  }
}
</style>
